<{include file="common/header" /}>
<script src="__JS__/pintuer.js"></script>
</head>
<body>
<div class="panel admin-panel">
    <div class="panel-head"><strong class="icon-reorder"> 内容列表</strong></div>
    <div class="padding border-bottom">
        <button type="button" class="button border-yellow" onclick="window.location.href='#add'"><span class="icon-plus-square-o"></span> 添加权限组</button>
    </div>
    <table class="table table-hover text-center">
        <tr>
            <th width="30%">ID</th>
            <th width="40%">权限组名称</th>
            <th width="310">操作</th>
        </tr>
        <{foreach $list as $v}>
        <tr>
            <td><{$v['id']}></td>
            <td><{$v['title']}></td>
            <td>
                <div class="button-group"><a class="button border-main" href="<{:url('authGroupEdit',['id'=>$v['id']])}>"><span class="icon-edit"></span> 修改</a>
                    <a class="button border-red" href="javascript:void(0)" onclick="return del(<{$v['id']}>,2)"><span class="icon-trash-o"></span> 删除</a>
                </div>
            </td>
        </tr>
        <{/foreach}>
        <!--<tr>-->
        <!--<td>7</td>-->
        <!--<td>新闻管理员</td>-->
        <!--<td>2019-7-3</td>-->
        <!--<td>-->
        <!--<div class="button-group"><a class="button border-main" href="cateedit.php?id=7"><span class="icon-edit"></span> 修改</a>-->
        <!--<a class="button border-red" href="cate.php?id=7&action=del"><span class="icon-trash-o"></span> 删除</a>-->
        <!--</div>-->
        <!--</td>-->
        <!--</tr>-->
        <!--<tr>-->
        <!--<td>6</td>-->
        <!--<td>产品管理员</td>-->
        <!--<td>2019-7-3</td>-->
        <!--<td>-->
        <!--<div class="button-group"><a class="button border-main" href="cateedit.php?id=6"><span class="icon-edit"></span> 修改</a>-->
        <!--<a class="button border-red" href="cate.php?id=6&action=del"><span class="icon-trash-o"></span> 删除</a>-->
        <!--</div>-->
        <!--</td>-->
        <!--</tr>-->
        <!--<tr>-->
        <!--<td colspan="4"><div class="pagelist"> <a href="">上一页</a> <span class="current">1</span><a href="">2</a><a href="">3</a><a href="">下一页</a><a href="">尾页</a> </div></td>-->
        <!--</tr>-->
    </table>
</div>
<script type="text/javascript">
    function del(id,mid){
        if(confirm("您确定要删除吗?")){
            location.href='authGroupDel?id='+id;

        }
    }
</script>
<div class="panel admin-panel margin-top">
    <div class="panel-head" id="add"><strong><span class="icon-pencil-square-o"></span>添加内容</strong></div>
    <div class="body-content">
        <form method="post" class="form-x" action="<{:url('authGroupAdd')}>">
            <div class="form-group">
                <div class="label">
                    <label>权限组名称：</label>
                </div>
                <div class="field">
                    <input type="text" class="input w50" name="title" />
                    <div class="tips"></div>
                </div>
            </div>
            <div class="form-group">
                <div class="label">
                    <label>权限节点：</label>
                </div>
                <div class="field" style="padding-top:8px;">
                    <{foreach $rule as $v}>
                    <{$v['title']}>:<input type="checkbox" name="rules[]" id="" value="<{$v['id']}>">
                    <{/foreach}>
                    <div class="tips"></div>
                </div>
            </div>
            <div class="form-group">
                <div class="label">
                    <label></label>
                </div>
                <div class="field">
                    <button class="button bg-main icon-check-square-o" type="submit"> 提交</button>
                </div>
            </div>
        </form>
    </div>
</div>
</body>
</html>
